﻿using Caliburn.PresentationFramework.ApplicationModel;
using CI.Models;

namespace CI.ViewModels
{
    public abstract class CIPresenterBase : ModelBase, IPresenter
    {
        private string _displayName;

        public abstract void Initialize();
        public abstract bool CanShutdown();
        public abstract void Shutdown();
        public abstract void Activate();
        public abstract void Deactivate();

        private static int _newCount;

        protected CIPresenterBase(string displayName)
        {
            DisplayName = displayName;
        }

        protected CIPresenterBase()
        {
            DisplayName = "New Sheet " + _newCount;
            _newCount++;
        }

        public string DisplayName
        {
            get { return _displayName; }
            set { SetField(ref _displayName, value, () => DisplayName); }
        }
    }
}